/*
function checkField(){
	var numField = document.getElementById('updateform_num').value;
	if ( numField == null || numField == "" ){
		var msg = "Please enter the number you've selected";
		alert(msg);		
		document.getElementById('updateform_num').focus();	
		return false;
	}
}
*/
/*
function regRequired() {
	var nic = document.getElementById('nic').value;
	var passport = document.getElementById('passport').value;
	var cdc = document.getElementById('cdc').value;
	
	if ( nic || passport || cdc ){
		return true;
	}
	else {
		var msg = "Please Enter one of NIC number , Passport number or CDC number";
		alert(msg);		
		document.getElementById('reg_form').focus(); 	
		return false;
	}
}*/

function validate() {
	var error = document.getElementById("error");	
	error.innerHTML = "";
	
	var nic = document.reg_form.NICNO.value;
	var passport = document.reg_form.PassportNo.value;
	var cdc = document.reg_form.CDCNO.value;
	
	if ( nic == "" && passport == "" && cdc == "" ) {
		error.innerHTML = "You must enter one of the NIC Number, Passport Number or CDC Number";
		error.style.display = "block";
		return false;
	}	
	return true;
}

function uploadImage() {
	window.location = "register.do";	
}

function validateLogin(){
	var error = document.getElementById("error");	
	error.innerHTML = "";
	
	var name = document.login_form.username.value;
	var password = document.login_form.password.value;
	
	if(name == "" && password == "") {
		error.innerHTML = "Please Enter Username and Password";
		error.style.display = "block";
		return false;
	}
	return true;
}

